<template>
    <div class="zhuzhuangtu">
        <div id="containers" class="chart" style="height: 100%"></div>
    </div>
</template>

<script setup lang="ts">
import * as echarts from 'echarts';
import { onMounted } from 'vue'
onMounted(() => {
    var chartDom = document.getElementById('containers');
    var myChart = echarts.init(chartDom);
    var option;

    option = {
        xAxis: {
            type: 'category',
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
            type: 'value'
        },
        series: [
            {
                data: [120, 200, 150, 80, 70, 110, 130],
                type: 'bar'
            }
        ]
    };

    option && myChart.setOption(option);

})
</script>

<style scoped>
.zhuzhuangtu {
    width: 100%;
    height: 300px;
    margin-top: -50px;
}
</style>